/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

import java.util.ArrayList;

/**
 *
 * @author Max
 */
public class Knoten {
    
    private String label;
    
    private int id;
    
    private Knoten parent;
    
    private double entropie;
    
    private ArrayList<Tupel> tupelListe;
    
    private Tabelle tabelle;
    
    private int index;
    
    public Knoten(String label, int id) {
        this(label, id, null);
    }
    
    public Knoten(String label, int id, Knoten parent) {
        this.parent = parent;
        this.label = label;
        this.id = id;
    }
    
    public String getLabel() {
        return label;
    }
    
    public int getId() {
        return id;
    }
    
    @Override
    public boolean equals(Object object) {
        Knoten knoten;
        if (object instanceof Knoten) {
            knoten = (Knoten) object;
        } else {
            return false;
        }
        if (knoten.getId() == getId()){
            return true;
        } else {
            return false;
        }
    }

    /**
     * @return the parent
     */
    public Knoten getParent() {
        return parent;
    }

    /**
     * @param parent the parent to set
     */
    public void setParent(Knoten parent) {
        this.parent = parent;
    }

    /**
     * @return the entropie
     */
    public double getEntropie() {
        return entropie;
    }

    /**
     * @param entropie the entropie to set
     */
    public void setEntropie(double entropie) {
        this.entropie = entropie;
    }

    /**
     * @return the tupelListe
     */
    public ArrayList<Tupel> getTupelListe() {
        return tupelListe;
    }

    /**
     * @param tupelListe the tupelListe to set
     */
    public void setTupelListe(ArrayList<Tupel> tupelListe) {
        this.tupelListe = tupelListe;
    }

    /**
     * @return the tabelle
     */
    public Tabelle getTabelle() {
        return tabelle;
    }

    /**
     * @param tabelle the tabelle to set
     */
    public void setTabelle(Tabelle tabelle) {
        this.tabelle = tabelle;
    }

    /**
     * @return the index
     */
    public int getIndex() {
        return index;
    }

    /**
     * @param index the index to set
     */
    public void setIndex(int index) {
        this.index = index;
    }
    
}
